﻿using Basic.FlowApplication.Interface;
using Basic.FlowRemoteModel.AuditSignFile;
using Basic.FlowRemoteModel.AuditSignFile.Model;
using WeDonekRpc.Client.Interface;

namespace Basic.FlowApplication.RpcEvent
{
    internal class AuditSignFileEvent : IRpcApiService
    {
        private readonly IFlowAuditSignFileService _Service;

        public AuditSignFileEvent ( IFlowAuditSignFileService service )
        {
            this._Service = service;
        }
        public void ApplySignFileAccredit ( ApplySignFileAccredit obj )
        {
            this._Service.SignFileAccredit(obj.Accredit);
        }
        public void SetAuditSignFileImg ( SetAuditSignFileImg obj )
        {
            this._Service.SetImgUri(obj.Id, obj.ImgUri, obj.FileId);
        }
        public long AddAuditSignFile ( AddAuditSignFile obj )
        {
            return this._Service.Add(obj.Datum);
        }

        public void DeleteAuditSignFile ( DeleteAuditSignFile obj )
        {
            this._Service.Delete(obj.Id);
        }

        public AuditSignFile[] GetAuditSignFiles ( GetAuditSignFiles obj )
        {
            return this._Service.Gets(obj.LogId);
        }
    }
}
